package com.softwarerusher.model;

/**
 * TReturnbookdetailId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class TReturnbookdetailId implements java.io.Serializable {

	// Fields

	private TBook TBook;
	private Integer returnbookNum;
	private Double returnbookPrice;
	private TReturnbook TReturnbook;

	// Constructors

	/** default constructor */
	public TReturnbookdetailId() {
	}

	/** minimal constructor */
	public TReturnbookdetailId(TBook TBook, Integer returnbookNum,
			TReturnbook TReturnbook) {
		this.TBook = TBook;
		this.returnbookNum = returnbookNum;
		this.TReturnbook = TReturnbook;
	}

	/** full constructor */
	public TReturnbookdetailId(TBook TBook, Integer returnbookNum,
			Double returnbookPrice, TReturnbook TReturnbook) {
		this.TBook = TBook;
		this.returnbookNum = returnbookNum;
		this.returnbookPrice = returnbookPrice;
		this.TReturnbook = TReturnbook;
	}

	// Property accessors

	public TBook getTBook() {
		return this.TBook;
	}

	public void setTBook(TBook TBook) {
		this.TBook = TBook;
	}

	public Integer getReturnbookNum() {
		return this.returnbookNum;
	}

	public void setReturnbookNum(Integer returnbookNum) {
		this.returnbookNum = returnbookNum;
	}

	public Double getReturnbookPrice() {
		return this.returnbookPrice;
	}

	public void setReturnbookPrice(Double returnbookPrice) {
		this.returnbookPrice = returnbookPrice;
	}

	public TReturnbook getTReturnbook() {
		return this.TReturnbook;
	}

	public void setTReturnbook(TReturnbook TReturnbook) {
		this.TReturnbook = TReturnbook;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TReturnbookdetailId))
			return false;
		TReturnbookdetailId castOther = (TReturnbookdetailId) other;

		return ((this.getTBook() == castOther.getTBook()) || (this.getTBook() != null
				&& castOther.getTBook() != null && this.getTBook().equals(
				castOther.getTBook())))
				&& ((this.getReturnbookNum() == castOther.getReturnbookNum()) || (this
						.getReturnbookNum() != null
						&& castOther.getReturnbookNum() != null && this
						.getReturnbookNum()
						.equals(castOther.getReturnbookNum())))
				&& ((this.getReturnbookPrice() == castOther
						.getReturnbookPrice()) || (this.getReturnbookPrice() != null
						&& castOther.getReturnbookPrice() != null && this
						.getReturnbookPrice().equals(
								castOther.getReturnbookPrice())))
				&& ((this.getTReturnbook() == castOther.getTReturnbook()) || (this
						.getTReturnbook() != null
						&& castOther.getTReturnbook() != null && this
						.getTReturnbook().equals(castOther.getTReturnbook())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getTBook() == null ? 0 : this.getTBook().hashCode());
		result = 37
				* result
				+ (getReturnbookNum() == null ? 0 : this.getReturnbookNum()
						.hashCode());
		result = 37
				* result
				+ (getReturnbookPrice() == null ? 0 : this.getReturnbookPrice()
						.hashCode());
		result = 37
				* result
				+ (getTReturnbook() == null ? 0 : this.getTReturnbook()
						.hashCode());
		return result;
	}

}